<!DOCTYPE html>
<html>
<head>
    <title>Events</title>

    <link href="../../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../../../styles/kendo.common.min.css" rel="stylesheet">
    <link href="../../../styles/kendo.default.min.css" rel="stylesheet">

    <script src="../../../js/jquery.min.js"></script>
    <script src="../../../js/kendo.web.min.js"></script>
    <script src="../../content/shared/js/console.js"></script>
</head>
<body>
    <a class="offline-button" href="../index.html">Back</a>
            <script src="../../content/shared/js/people.js"></script>

        <div id="example" class="k-content">
            <div id="grid"></div>

            <script>
                function onChange(arg) {
                    var selected = $.map(this.select(), function(item) {
                        return $(item).text();
                    });

                    kendoConsole.log("Selected: " + selected.length + " item(s), [" + selected.join(", ") + "]");
                }

                function onDataBound(arg) {
                    kendoConsole.log("Grid data bound");
                }

                $(document).ready(function() {
                    $("#grid").kendoGrid({
                        dataSource: {
                            data: createRandomData(50),
                            pageSize: 5
                        },
                        change: onChange,
                        dataBound: onDataBound,
                        selectable: "multiple cell",
                        pageable: true,
                        sortable: true,
                        scrollable: false,
                        columns: [
                            {
                                field: "FirstName",
                                title: "First Name"
                            },
                            {
                                field: "LastName",
                                title: "Last Name"
                            },
                            {
                                field: "Age"
                            }
                        ]
                    });
                });
            </script>
        </div>
        <div class="console"></div>
</body>
</html>
